{{define "Fara/header"}}
<header class="header">
    <h1 class="header__title">
        <a href="{{.BlogURL}}" class="fn__flex-center">
            <span class="header__logo" data-src="{{.LogoURL}}"></span>
            {{.Setting.BasicBlogTitle}}
        </a>
    </h1>
    <div class="header__sub-title">
        {{.Setting.BasicBlogSubtitle}}
    </div>
</header>
<nav class="nav">
    <a href="{{.BlogURL}}" class="fn__flex-center">
        <svg>
            <use xlink:href="#icon-home"></use>
        </svg>
        {{.I18n.Index}}
    </a>
    <a href="{{.BlogURL}}/categories" class="fn__flex-center">
        <svg>
            <use xlink:href="#icon-folders"></use>
        </svg>
        {{.I18n.Categories}}
    </a>
    <a href="{{.BlogURL}}/tags" class="fn__flex-center">
        <svg>
            <use xlink:href="#icon-tag"></use>
        </svg>
        {{.I18n.Tags}}
    </a>
    <a href="{{.BlogURL}}/archives" class="fn__flex-center">
        <svg>
            <use xlink:href="#icon-bookmark"></use>
        </svg>
        {{.I18n.Archives}}
    </a>
    {{if gt .UserCount 1}}
    <a href="{{.BlogURL}}/authors" class="fn__flex-center">
        <svg>
            <use xlink:href="#icon-group"></use>
        </svg>
        {{.I18n.Team}}
    </a>
    {{end}}
    {{range .Navigations}}
    <a href="{{.URL}}" target="{{.OpenMethod}}" class="fn__flex-center">
        {{if ne "" .IconURL}}
        <img data-src="{{.IconURL}}"/>
        {{else}}
        <svg style="width:0;margin-right: 0"></svg>
        {{end}}
        {{.Title}}
    </a>
    {{end}}
    <a href="{{.BlogURL}}/atom" target="_blank" class="fn__flex-center">
        <svg>
            <use xlink:href="#icon-feed"></use>
        </svg>
        {{.I18n.Feed}}
    </a>

    <a target="_blank" class="fn__flex-center" href="{{.BlogURL}}/search">
        <svg>
            <use xlink:href="#icon-search"></use>
        </svg>
        {{.I18n.Search}}
    </a>

    {{if eq .User.URole 0}}
    <a href="{{.Conf.Server}}/start" class="fn__flex-center">
        <svg>
            <use xlink:href="#icon-login"></use>
        </svg>
        {{.I18n.StartToUse}}
    </a>
    {{else}}
    <a class="fn__flex-center"
       href="{{.Conf.Server}}/{{if ne .User.URole 4}}admin/{{end}}">
        <img data-src="{{.User.AvatarURLWithSize 64}}" />
        {{.I18n.manage}}
    </a>
    {{end}}
</nav>
{{end}}
